package com.atguigu.jxc.controller;

import com.atguigu.jxc.domain.ServiceVO;
import com.atguigu.jxc.entity.SaleList;
import com.atguigu.jxc.service.SaleListGoodsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author :ttm
 * @description :
 */
@RestController
@RequestMapping("/saleListGoods")
public class SaleListGoodsController {
    @Autowired
    private SaleListGoodsService saleListGoodsService;
    /**
     * 销售单保存
     * 请求URL：http://localhost:8080/saleListGoods/save?saleNumber=XS1605772263999 （销售单号）
     * 请求参数：SaleList saleList, String saleListGoodsStr
     * 请求方式：POST
     * 返回值类型：JSON
     * 返回值：ServiceVO
     */
    @PostMapping("/save")
    public ServiceVO save(SaleList saleList, String saleListGoodsStr) {
     return saleListGoodsService.save(saleList,saleListGoodsStr);
    }

}
